import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',

      name: 'Login',
      component: ()=>import('../components/login')
    },
    {
      path:'/FuserSelf',
      name:'/FuserSelf',
      component:()=>import('../components/FuserSelf')
    }
    ,
    {
      path:"/register",
      name:"/register",
      component:()=>import('../components/register')
    },
    {
    //俘虏有
    path : "/main",
    name:'Main',
       redirect:'/bm',
     components: {

     'default': ()=>import("../components/MainC")
     },

    children:[

  {
    path: '/books',
    name: 'booksManager',
    components: {
      'default': () => import('../components/BooksManager')
    }
  },

  {
    path: '/fuser',
    name: 'fuserManager',
    components: {
      'default': () => import('../components/FuserManager')
    }
  },
      {
        path: '/activity',
        name: 'activityManager',
        components: {
          'default': () => import('../components/ActivityManager')
        }
      },
      {
        path: '/forder',
        name: 'forderManager',
        components: {
          'default': () => import('../components/Forder')
        }
      },
  {
    path: '/login',
    name: 'login',
    components:{
      'default': ()=> import('../components/login')
    }
  },
      {
        path:'/forde',
        name:'Forder',
        component: () => import('../components/foder')
      },
      {
        path:'/cart',
        name:'Cart',
        component: () => import('../components/Cart')
      },
      {
        path:'/site',
        name:'Fsite',
        component: () => import('../components/Fsite')
      },


      {
        path: '/bm',
        name: 'bm',
        components: {
          'default' :()=>import('../components/BookM2')
        }
      }


]

  }
  ]
})

// {
//   //父路由
//   path:'/main',
//     name:'Main',
//   component:()=>import("../components/Main"),
//   //子路由
//   children:[
//   {
//     path: 'book',
//     name: 'book',
//     component: Book
//   },{
//     path:'user',
//     name: 'user',
//     component:()=>import("../components/User")
//   },
//   {
//     path:'fuser',
//     name: 'fuser',
//     component:()=>import("../components/Fuser")
//   },
//   {
//     path:'order',
//     name: 'order',
//     component:()=>import("../components/Order")
//   },
//   {
//     path:'texture',
//     name:'texture',
//     component:()=>import("../components/Texture")
//   }
//
// ]
// }
